﻿using System;
using System.Collections.Generic;
using System.Text;
using DotNetCore.BannerManagement.DAL.Domain;

namespace DotNetCore.BannerManagement.BLL
{
    public class ImpressionManager
    {

        public void InsertImpression(int advertisementID)
        {

            // Declare repository
            DotNetCore.BannerManagement.DAL.Domain.dnc_ImpressionRepositoryArtifacts.dnc_ImpressionRepository repository = new DotNetCore.BannerManagement.DAL.Domain.dnc_ImpressionRepositoryArtifacts.dnc_ImpressionRepository();

            // Create impression object
            Domain.dnc_Impression impression = new Domain.dnc_Impression();

            // Assign impression Variables
            impression.AdvertisementID = advertisementID;
            impression.Impression = System.DateTime.Now;

            // Add impression to database
            repository.Add(impression);

        }

    }
}
